# 如果变量没有赋值  就是用  这个内容
arch ?= arm
modname ?= myleds
# $(warning "the value of LOCAL_PATH is$(LOCAL_SRC_FILES)")

ifeq ($(arch),arm)
$(info --arch 等于 arm arch-,$(arch))
	KERNELDIR := /home/linux/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61
# KERNELDIR := /home/linux/linux-5.10.61
else
$(info --arm 不等于 arm arch是【$(arch)】)
	KERNELDIR := /lib/modules/$(shell uname -r)/build/
endif

PWD := $(shell pwd)
$(info --PWD【$(PWD)】)

all:

	make -C $(KERNELDIR) M=$(PWD) modules

clean:
	make -C $(KERNELDIR) M=$(PWD) clean
obj-m:=$(modname).o
